package com.example.diskfilesystem.file;

public class OFTLE {
    private String name;// 文件绝对路径
    private byte attribute; // 文件属性
    int number;//文件起始盘块号
    int length;//文件长度
    int flag;//操作类型，0读/1写方式打开文件
    Pointer read;//读文件的位置
    Pointer write;//写文件的位置
    public static final int WRITE = 1;
    public static final int READ = 0;

    public OFTLE(String name, byte attribute, int number, int flag) {
        this.name = name;
        this.attribute = attribute;
        this.number = number;
        this.length = 64;
        this.flag = flag;
        this.read = new Pointer();
        this.write = new Pointer();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public byte getAttribute() {
        return attribute;
    }

    public void setAttribute(byte attribute) {
        this.attribute = attribute;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getFlag() {
        return flag;
    }

    public void setFlag(int flag) {
        this.flag = flag;
    }

    public Pointer getRead() {
        return read;
    }

    public void setRead(Pointer read) {
        this.read = read;
    }

    public Pointer getWrite() {
        return write;
    }

    public void setWrite(Pointer write) {
        this.write = write;
    }


}
